%%%-------------------------------------------------------------------
%%% @author 92913
%%% @copyright (C) 2024, <COMPANY>
%%% @doc
%%%
%%% @end
%%% Created : 20. 7月 2024 12:01
%%%-------------------------------------------------------------------
-module(main_module).
-author("92913").

%% API
-export([start/0,do_something/2]).

do_something(_, 0) -> done;
do_something(X, Times) ->
  io:format("~p~n", [X]),
  do_something(X, Times - 1).

%% 创建两个进程
start() ->
  spawn(main_module, do_something, [hello, 5]),
  spawn(main_module, do_something, [goodbye, 10]).